From 3a1e019e83595b747d4734dd32d98511b31413e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Thu, 15 Oct 2020 06:05:39 +0200 Subject: [PATCH] print-editor: Fix a wrong comparison If error is NULL, replacing the file contents worked and we don't show the error dialog. The previous version pretty explicitly dereferenced a NULL pointer by first ensuring that error is NULL and then accessing error->message. Found by scan-build --- demos/print-editor/print-editor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/print-editor/print-editor.c b/demos/print-editor/print-editor.c index 416ff9db31..a0c8da320d 100644 --- a/demos/print-editor/print-editor.c +++ b/demos/print-editor/print-editor.c @@ -164,7 +164,7 @@ save_file (GFile *save_filename) NULL, &error); - if (error != NULL) + if (error == NULL) { if (save_filename != filename) { -- 2.30.2